"""
@Filename       : ic.py
@Create Time    : 2021/1/13 10:50
@Author         : Rylynn
@Description    : 

"""
import random

import networkx as nx

class IC(object):
    def __init__(self, config):
        super(IC, self).__init__()

    def run(self, network, ):
        pass

def propagate(g, node):
    neighbors = g[node]
    if random.uniform(0, 1) < g[neighbors]['prob']:
        g[neighbors]['activation'] = 1



def main():
    g = nx.DiGraph()
    seeds = []
    pass


if __name__ == '__main__':
    main()